﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;

namespace client
{
    public class RestaurantContent : INotifyPropertyChanged
    {

        private int id;
        private string name;
        private string provider;
        
        public event PropertyChangedEventHandler PropertyChanged;

        public RestaurantContent() 
        {
            id = ID;
            name = Name;
            provider = Provider;
        }

        public RestaurantContent(int id, string name, string provider) 
        {
            id = ID;
            name = Name;
            provider = Provider;
        }

        public int ID
        {
            get
            {
                return id;
            }
            set
            {
                if (value != id)
                {
                    id = value;
                    NotifyPropertyChanged("ID");
                }
            }
        }

        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                if (value != name)
                {
                    name = value;
                    NotifyPropertyChanged("Name");
                }
            }
        }

        public string Provider
        {
            get
            {
                return provider;
            }
            set
            {
                if (value != provider)
                {
                    provider = value;
                    NotifyPropertyChanged("Provider");
                }
            }
        }

        private void NotifyPropertyChanged(string property)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(property));
            }
        }


    }
}
